fs/jfs: Inconsistent signed/unsigned types usage in return values
authorLidong Chen <lidong.chen@oracle.com>
Mon, 16 Dec 2024 20:22:40 +0000 (20:22 +0000)
committerMiao Wang <shankerwangmiao@gmail.com>
Sun, 15 Feb 2026 13:50:20 +0000 (13:50 +0000)
commit7035345081f25246a54fdd5bd7bc28734c0deb6a
tree9bae1ea3c8ba999a04be5f3d26cf05bad7685a06
parent9ef1c46fbeecae1a87cacfe70d16906aac30f075
fs/jfs: Inconsistent signed/unsigned types usage in return values

The getblk() returns a value of type grub_int64_t which is assigned to
iagblk and inoblk, both of type grub_uint64_t, in grub_jfs_read_inode()
via grub_jfs_blkno(). This patch fixes the type mismatch in the
functions. Additionally, the getblk() will return 0 instead of -1 on
failure cases. This change is safe because grub_errno is always set in
getblk() to indicate errors and it is later checked in the callers.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-jfs-Inconsistent-signed-unsigned-types-usage-in-return.patch
grub-core/fs/jfs.c